Skip to content

vec: add extract_if()#665

Open
max-heller wants to merge 1 commit into
rust-embedded:mainfrom
max-heller:vec-extract-if
Open

vec: add extract_if()#665
max-heller wants to merge 1 commit into
rust-embedded:mainfrom
max-heller:vec-extract-if

Conversation

@max-heller

Copy link
Copy Markdown

Adapts alloc::vec::Vec::extract_if() to implement heapless::Vec::extract_if()

I noticed that vec::Drain stores LenT instead of usize for its internal indices. Should we do the same here to save a few bytes? I wasn't sure if it's worth it relative to the (also small) cost of casting back and forth between LenT and usize.

@max-heller max-heller force-pushed the vec-extract-if branch 5 times, most recently from bf48590 to 4824e86 Compare June 9, 2026 19:02
Adapts alloc::vec::Vec::extract_if()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant